//
//  GodController.h
//  SujetObserver
//
//  Created by Pierre DUCHENE on 25/01/10.
//  Copyright 2010 Pierre DUCHENE. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "SensorProtocol.h"
#import "SubjectProtocol.h"

#define kPathForOperationQueue	@"updateQueue.operations"
#define kPathForTemperature		@"temperature"

@class Sun;
@class Canal;
@class Displayer;

/*!
    @class       AppController 
    @superclass  NSViewController
    @abstract    This class is the main view of the application. It contains all view object needed to build the interface.
    @discussion  They are three main part in the interface, at right side, the spread strategy selection.
				 In bottom left side, the three displayer and finaly at the top left side it is the sensor mutator part.
				 It is possible to modify either automatiquely or manually with the slider.
*/
@interface AppController : NSViewController {
	// IHM
	IBOutlet NSButton* sunButton;
	IBOutlet NSTextField* strategyLabel;
	IBOutlet NSTextField* sunTextField;
	IBOutlet NSTextField* sliderLabel;
	IBOutlet NSButton* atomicButton;
	IBOutlet NSButton* sequentialButton;
	IBOutlet NSButton* versionButton;
	NSInteger sliderValue;
	// Afficheur
	IBOutlet Displayer* fastestDisplayer;
	IBOutlet Displayer* randomDisplayer;
	IBOutlet Displayer* slowestDisplayer;
	
	// Model
	Sun* sun;
	id<SensorProtocol,SubjectProtocol> temperatureSensor;
	
	// Canaux
	Canal* fastestCanal;
	Canal* randomCanal;
	Canal* slowestCanal;
}

@property (assign) NSInteger sliderValue;

- (IBAction)sunAction:(id)sender;
- (IBAction)strategyChangeAction:(id)sender;

- (void)showVersion:(BOOL)boolValue;
- (void)activeStrategies:(BOOL)boolValue;

@end
